#include("../../comm/FormHead.html")
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title" style="width: 100%;float:left">
        <li class="layui-this"><i class="layui-icon layui-icon-tabs"></i> 编辑功能</li>
        <li lay-event="SetActivityRole"><i class="layui-icon layui-icon-user"></i> 功能权限(角色)</li>
        <li lay-event="SetActivityUser"><i class="layui-icon layui-icon-username"></i> 功能权限(人员)</li>
    </ul>
</div>
<div id="main">
    <div class="layui-row" style="padding-bottom:5px"></div>
    <form action="" class="layui-form margin-10" lay-filter="form">
        <input type="hidden" id="actions" name="actions" value="#(form.actions)">
        #(token??)
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">功能ID</label>

                    <div class="layui-input-block">
                        <input type="text" readonly id="act_id" name="act_id" placeholder="自动生成" value="#(act.act_id)" class="layui-input input-readonly">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">功能名称</label>

                    <div class="layui-input-block">
                        <input type="text" name="act_name" placeholder="请输入功能名称" lay-affix="clear"
                               value="#(act.act_name)" class="layui-input">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">功能路经</label>

                    <div class="layui-input-block">
                        <input type="text" name="act_path" placeholder="请输入功能路经" readonly
                               value="#(act.act_path)" class="layui-input input-readonly">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">功能角色</label>

                    <div class="layui-input-block">
                        <input type="text" name="act_role_name" placeholder=""
                               value="[#(act.act_role)]#(act.act_role_name)" class="layui-input input-readonly">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">功能用户</label>

                    <div class="layui-input-block">
                        <input type="text" name="act_user_name" placeholder=""
                               value="#(act.act_user_name)" class="layui-input input-readonly">
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-row">
            <div class="layui-col-md12">
                <div class="layui-form-item">
                    <label class="layui-form-label">备注</label>

                    <div class="layui-input-block">
                        <textarea name="act_desc" placeholder="请输入备注" class="layui-textarea" style="height:120px">#(act.act_desc)</textarea>

                    </div>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" lay-filter="Submit1">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>
<SCRIPT LANGUAGE="JavaScript">
    <!--
    layui.use(['form', 'myTool', 'util'], function () {

        layui.util.event("lay-event", {
            SetActivityRole: function () {
                location.href = "SetActivityRole?act_id=" + $("#act_id").val();
            },
            SetActivityUser: function () {
                location.href = "SetActivityUser?act_id=" + $("#act_id").val();
            }
        });

        layui.form.on('submit(Submit1)', function (data) {
            layui.myTool.post("ModifySysActivityApi", {postdata: JSON.stringify(data.field)}, function () {
                parent.layer.closeAll();
            });
            return false;
        });
    });
    //-->
</SCRIPT>
</body>
</html>